﻿using System;
using System.Collections.Generic;
using System.Web;
using System.IO;
using System.Net;
using System.Diagnostics;
using System.Text;

namespace BpmHsjqYw.Common
{
    public class WriteLog
    {
        //定义写入日志文件的默认路径
        public void Log(string strProname, string pLogInfo)
        {
            string pLogPath = @"D:\SureLog\Log\strProname" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
            try
            {
                FileInfo pfile = new FileInfo(pLogPath);
                StreamWriter pwrite = pfile.AppendText();
                pwrite.WriteLine(DateTime.Now.ToString());
                pwrite.WriteLine(pLogInfo);
                pwrite.Close();
            }
            catch
            {
            }
        }
    }
}